<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-if</title>
    <!--导入vue.js-->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
</head>
<body>
<!--view层 模板-->
<div id="app">
    <div v-if="message">
        测试v-if
    </div>
    <div v-else>
        测试v-else
    </div>

    <div v-if="test==='A'">
        测试test===A
    </div>


</div>

</body>
<script>
    const vue = new Vue({
        el : "#app",
        //Model:数据
        data : {
            message: false,
            test:'A'
        }
    });
</script>
</html>